#!/usr/bin/php5
<?php

require('auc_api.php');

$auc = new auc_api();

echo "\n\n ----- get auc search rss directly ----- \n";
$p=array(
's'=>'-numbids', //curprice,numbids,buyPrice,endtime,ptime
'haspic'=>'1',
'cat'=>'',
'mincurprice'=>'',
'maxcurprice'=>'',
'ei'=>'UTF-8',
);
print_r($auc->get_search_rss_d('iphone',$p));
exit;

echo "\n\n ----- get watchlist ----- \n";
print_r($auc->get_watchlist('tw_auc_user3'));

echo "\n\n ----- get auc search rss ----- \n";
$p=array(
's'=>'-numbids', //curprice,numbids,buyPrice,endtime,ptime
'haspic'=>'1',
'cat'=>'',
'mincurprice'=>'',
'maxcurprice'=>'',
'ei'=>'UTF-8',
);
print_r($auc->get_search_rss('iphone',$p));

echo "\n\n ----- get auc search category ----- \n";
print_r($auc->get_search_category('iphone',$p));

echo "\n\n ----- get auc auto complete ----- \n";
print_r($auc->get_autocomplete('iphone'));

echo "\n\n ----- get auc buy history ----- \n";
print_r($auc->get_buy_history('honey02272002'));


require('mall_api.php');
$mall = new mall_api();
echo "\n\n ----- get mall search ----- \n";
$p=array(
'img_only'=>'',
'sort_by'=>'price', // price,salerank,starttime
'order_by'=>'0',
'catid'=>'0',
);
print_r($mall->get_search('iphone',$p));


require('buy_api.php');
$buy = new buy_api();
echo "\n\n ----- get buy search ----- \n";
$p=array(
'sort1'=>'precise', // precise/price/-price/hot/pubdate/-pubdate
'catsel'=>'',
'btn_srch'=>'',
'z'=>'0',
'subno'=>'0',
);
print_r($buy->get_search('iphone',$p));



?>
